<?php include('header.php'); ?>

<!-- additional javascript hear -->
</head>
<body>
<div id="wrapper">
<!-- menu -->
<?php include('menu.php'); ?>
<!-- end menu -->

<!-- navigator -->
<?php include('navigator.php'); ?>
<!-- nav end -->

  <div id="one_wide">
 <?php
	if($this->session->flashdata('error'))
	{ 
	echo '<div class="error">' . $this->session->flashdata('error') . '</div>';
	}
?>
	
<div class="item">
<img src="<?=base_url();?>application/images/vcard.png" />
<h2>เปลี่ยนรูปประจำตัว</h2><hr />

<img src="<?=$this->usermodel->getAvatar($this->session->userdata('userId'));?>"><br />

<?php
echo form_open_multipart('profile/uploadAvatar');
echo form_upload('userfile');
echo form_submit('upload', 'Upload!!');
echo form_close();
echo "<p>*ขนาดไม่ควรเกิน 1 MB</p>";
?>

</div>
</div>
<!-- footer -->
<?php include('footer.php');?>
<!-- footer end -->
</div>
</body>
</html>